﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using KPIS.GERP.GFMS.IBLL;
using KPIS.GERP.GFMS.BLL;
using KPIS.GERP.GFMS.MODEL;
using KPIS.GERP.GFMS.IDAL;
using KPIS.GERP.GFMS.DAL;

namespace KPIS.GERP.GFMS.SERVICE
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class BGM_ProjectOperation : System.Web.Services.WebService
    {
        IBLL_BGM_ProjectOperation bll = new B_BGM_ProjectOperation();

        [WebMethod]
        public List<M_BGM_ProjectOperation> GetFull(string bgm_source_seq, string bgm_year
            , string job_site_seq, string bgm_proj_seq
            , string use_date, bool IsUse, bool ApproveOnly)
        {
            return (List<M_BGM_ProjectOperation>)bll.GetFull(bgm_source_seq, bgm_year
            , job_site_seq, bgm_proj_seq
            , use_date, IsUse, ApproveOnly);
        }

        [WebMethod]
        public List<M_BGM_ProjectOperation> GetList(string bgm_source_seq, string bgm_year
            , string job_site_seq, string bgm_proj_seq
            , string use_date, bool IsUse, bool ApproveOnly)
        {
            return (List<M_BGM_ProjectOperation>)bll.GetList(bgm_source_seq, bgm_year
            , job_site_seq, bgm_proj_seq
            , use_date, IsUse, ApproveOnly);
        }

        [WebMethod]
        public List<M_BGM_ProjectOperation> GetProjectListByEmpSeq(string bgm_year, string bgm_source_seq, string emp_seq)
        {
            return (List<M_BGM_ProjectOperation>)bll.GetProjectListByEmpSeq(bgm_year, bgm_source_seq, emp_seq);
        }

        [WebMethod]
        public M_BGM_ProjectOperation GetInfo(string seq)
        {
            return bll.GetInfo(seq);
        }

        [WebMethod]
        public string Insert(M_BGM_ProjectOperation info)
        {
            try
            {
                return bll.Insert(info);
            }
            catch
            {
                return "";
            }
        }

        [WebMethod]
        public void Update(M_BGM_ProjectOperation info)
        {
            bll.Update(info);
        }

        [WebMethod]
        public void Delete(M_BGM_ProjectOperation info)
        {
            bll.Delete(info);
        }

        [WebMethod]
        public bool ChangeStatus(M_BGM_ProjectOperation info)
        {
            return bll.ChangeStatus(info);
        }

        [WebMethod]
        public void CloseOperation(M_BGM_ProjectOperation info)
        {
            bll.CloseOperation(info);
        }

        //[WebMethod]
        //public string SelectRecentInsertedRoleSeq()
        //{
        //    return bll.SelectRecentInsertedRoleSeq();
        //}

        [WebMethod]
        public DataTable Report_ProjectOperation(string seq)
        {
            return bll.Report_ProjectOperation(seq);
        }

        [WebMethod]
        public DataTable SubReport_ProjectOperation(string seq)
        {
            return bll.SubReport_ProjectOperation(seq);
        }

        [WebMethod]
        public DataTable Report_ProjectOperationEdit(string seq)
        {
            return bll.Report_ProjectOperationEdit(seq);
        }

        [WebMethod]
        public DataTable SubReport_ProjectOperationEdit(string seq)
        {
            return bll.SubReport_ProjectOperationEdit(seq);
        }

        [WebMethod]
        public string GetOptionProduct(string seq)
        {
            return bll.GetOptionProduct(seq);
        }

        private void InitializeComponent()
        {

        }
    }
}
